//
//  Header.h
//  JAGatherAdDemo
//
//  Created by Yc on 2022/4/27.
//

#ifndef Header_h
#define Header_h

#import <MBProgressHUD/MBProgressHUD.h>

#define ThemeColor        [UIColor colorWithRed:27/255.0 green:106/255.0 blue:193/255.0 alpha:1]

#define SplashHotStartkey       @"SplashHotStartkey"
#define SplashBottomViewkey     @"SplashBottomViewkey"

//圆角
#define ViewRadius(View,Radius)\
\
[View.layer setCornerRadius:(Radius)];\
[View.layer setMasksToBounds:YES]


/* TOAST(消息提示) */
#define ToastPrompt(string , time) \
if (string == nil || (NSNull *)string == [NSNull null] || ((NSString *)string).length == 0 || [string isEqualToString:@""] || [[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length] == 0) { \
} else { \
[MBProgressHUD hideHUDForView:[UIApplication sharedApplication].keyWindow animated:YES]; \
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:[UIApplication sharedApplication].keyWindow animated:YES]; \
hud.center = CGPointMake([[UIScreen mainScreen] bounds].size.width / 2, [[UIScreen mainScreen] bounds].size.height / 2); \
hud.mode = MBProgressHUDModeCustomView; \
hud.margin = 15.0f; \
hud.minSize = CGSizeMake(180, 80); \
hud.bezelView.layer.cornerRadius = 10.0f; \
hud.bezelView.layer.masksToBounds = YES; \
hud.bezelView.backgroundColor = [UIColor darkGrayColor]; \
UILabel *tipLabel = [[UILabel alloc] init]; \
[tipLabel setFont:[UIFont systemFontOfSize:16]]; \
tipLabel.textAlignment = NSTextAlignmentCenter; \
tipLabel.numberOfLines = 0; \
tipLabel.text = (NSString *)string; \
hud.customView = tipLabel; \
hud.animationType = MBProgressHUDAnimationFade;\
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, time * NSEC_PER_SEC); \
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ \
[MBProgressHUD hideHUDForView:[UIApplication sharedApplication].keyWindow animated:YES]; \
}); \
}

#define TOAST(string) ToastPrompt(string,1.5)



#define splashID                @"10356328"
#define interstitialID          @"10356375"
#define bannerID                @""
#define nativeID                @"10356330"
#define rewardID                @"10356331"
#define fullscreenID            @""

#define appID                   @"z9Y8b40Mu4"
#define appKeyID                @"24370fb5e0be9e5f6ea05ad6b13e0829"


#endif /* Header_h */

